package com.i8office.android.zhihuixinwu.bean;


import com.i8office.android.zhihuixinwu.ui.schedule.CheckInGroup;
import com.i8office.android.zhihuixinwu.ui.schedule.DayItem;
import com.i8office.android.zhihuixinwu.ui.schedule.EventItem;
import com.i8office.android.zhihuixinwu.ui.schedule.LeaderData;
import com.i8office.android.zhihuixinwu.ui.schedule.Meetting;
import com.i8office.android.zhihuixinwu.ui.schedule.ScheduleData;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import bean.WorkFlow;
import io.reactivex.Completable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import io.reactivex.Observable;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface ApiService {

    @POST("/Apps/Cal/WorkPlan/CheckInGroup")
    Observable<CheckInGroup> checkInGroup();

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/Calendar")
    Observable<Result<List<DayItem>>> getCalendarData(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/DeleteTask")
    Observable<Code> deleteEvent(@FieldMap Map<String, String> param);

    @POST("/Apps/Cal/Leader/GetLeaders")
    Observable<Result<LeaderData>> getLeadersData();

    @POST("/Apps/Cal/Leader/GetGroupUsers")
    Observable<Result<LeaderData>> getGroupLeadersData();

    @FormUrlEncoded
    @POST("/Apps/Cal/WorkPlan/OtherTasks")
    Observable<Result<List<Meetting>>> getMeettings(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/NewTask")
    Observable<Code> addEvent(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/UpdateTask")
    Observable<Code> updateEvent(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/WorkPlan/TaskUpdate")
    Observable<Code> updateOtherEvent(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/GetByDate")
    Observable<Result<List<EventItem>>> getEventsByDate(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Personal/GetTaskListGroupByDate")
    Observable<Result<List<EventItem>>> getScheduleList(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Leader/GetTasksByWeek")
    Observable<ScheduleData> getLeaderScheduleByName(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Cal/Leader/GetTasksByDate")
    Observable<ScheduleData> getLeaderScheduleByDate(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Archives/WorkFlowPage/GetPendingInfo")
    Observable<Result<ArrayList<WorkFlow>>> getPending(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/DEP/WorkFlowPage/GetPendingInfo")
    Observable<Result<ArrayList<WorkFlow>>> getPendingDep(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/DEP/WorkflowPage/GetDealWithInfo")
    Observable<Result<ArrayList<WorkFlow>>> getPendingDepDeal(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Archives/WorkFlowPage/GetDealWithInfo")
    Observable<Result<ArrayList<WorkFlow>>> getDeals(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/GetChangedRecord")
    Observable<WorkFlowUnRead> getNotify(@FieldMap Map<String, String> param);

    @GET("/Apps/Tiger/Workflow/GetDetailInfo")
    Observable<Result<WorkSheet>> getWorkSheet(@Query("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/DEP/Workflow/GetDetailInfo")
    Observable<Result<WorkSheetNew>> getWorkSheetDep(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/AddFavorite")
    Observable<Code> addFavorite(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/CancelFavorite")
    Observable<Code> cancelFavorite(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/DEP/Favorite/AddFavorite")
    Observable<Code> addDepFavorite(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/DEP/Favorite/CancelFavorite")
    Observable<Code> cancelDepFavorite(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/Workflow/Running/GetPreviewResult")
    Observable<Preview> getPreviewResult(@Field("id") String id);

    @FormUrlEncoded
    @POST("/Apps/News/Running/GetPreviewResult")
    Observable<Preview> getNewsPreviewResult(@Field("id") String id);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Running/GetPreviewResult")
    Observable<Preview> getExcelPreview(@Field("id") String id);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Running/GetCebPdf")
    Observable<Preview> getCebPreview(@Field("id") String id);

    @GET("/Apps/Tiger/Opinion/GetPublicOpinion")
    Observable<Result<OpinionInfo>> getPublicOpinion();

    @GET("/Apps/Tiger/Opinion/GetPrivateOpinionMobile")
    Observable<Result<OpinionInfo>> getPrivateOpinion();

    @FormUrlEncoded
    @POST("/Apps/Tiger/Opinion/AddPrivateOpinion")
    Observable<Code> addPrivateOpinion(@Field("content") String content);

    @FormUrlEncoded
    @POST("/Apps/Workflow/HttpService/GetSendInfo")
    Observable<Result<SendInfo>> getSendInfo(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/People/Shared/do_SearchPeople.aspx")
    Observable<ArrayList<People>> searchPeople(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Workflow/Running/CheckFieldsBeforeSubmit")
    Observable<Code> checkFieldsBeforeSubmit(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Workflow/Running/Send")
    Observable<Code> send(@FieldMap Map<String, String> param);

    @GET("/Apps/Workflow/Running/Open")
    Observable<String> open(@QueryMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Workflow/Worksheet/SaveCell")
    Observable<Code> saveCell(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/MessageHandle")
    Observable<Result<Empl>> messageHandle(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/GroupCalendar/GetTasksByWeek")
    Observable<Result<Task>> getTasksByWeek(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @GET("/Apps/Tiger/GroupCalendar/GetGroupUsers")
    Observable<Result<GroupUser>> getGroupUser();

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/AddNewOpinion")
    Observable<Code> addNewOpinion(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/ReadNewOpinion")
    Observable<Code> read(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/AddNotifyRecord")
    Observable<String> sendNotification(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/FavoriteList")
    Observable<Result<ArrayList<WorkFlow>>> getFavoriteList(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/DEP/Favorite/FavoriteList")
    Observable<Result<ArrayList<WorkFlow>>> getFavoriteDepList(@FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST("/Apps/Tiger/Workflow/IsFavorite")
    Observable<Result<Favorite>> isFavorite(@Field("mid") String mid);

    @FormUrlEncoded
    @POST("/Apps/DEP/Favorite/IsFavorite")
    Observable<Result<Favorite>> isDepFavorite(@Field("mid") String mid);


}
